package web.dmt.dao.impl;

import java.sql.*;

import web.dmt.dao.*;
import web.dmt.date.DATE;

public class AdminImpl implements AdminDAO{
	private Connection conn = null ;
	private PreparedStatement pstm = null ;
	java.util.Date d = null ;
	java.sql.Date de = null ;
	DATE date = new DATE() ;
	
	public AdminImpl(Connection conn){
		this.conn = conn ;
	}
	
	public boolean delete(String chart,int id) throws Exception {
		boolean flag = false ;
		if(chart!=null&&id!=0&&!"".equals(chart.trim())){
			if("users".equals(chart)){
				String sql = "delete from users where uid="+id ;
				this.pstm = this.conn.prepareStatement(sql) ;
				if(this.pstm.executeUpdate()>0){
					flag = true ;
				}
			}
		}
		return flag ;
	}

}
